package behavior.state;

/**
 * @author dali
 * @date 2021-07-28 15:17
 * @Description
 */

public class Runnable extends State {
    public Runnable() {
        System.out.println("当前线程处于：就绪状态");
    }
    @Override
    public void getCPU(Context context) {
        System.out.print("获得CPU时间片-->");
        context.setState(new Running());
    }
}
